#ifndef _CONFIG_WR_
#define _CONFIG_WR_

typedef enum _connectionServerIpIndex
{
		_centerProxyServer = 0,	
		_broadcastServer = 1,
		
		_connectionServerIpMax,
}ConnectionServerIpIndex;

typedef enum _multconnectionServerIpIndex
{
		_windowsServer = 0,
		
		_multConnectionServerIpMax,
}MultConnectionServerIpIndex;

typedef enum _projectorActionWay
{
		_open = 0,
		_close,
		_vga,
		_hdmi,
		
		_projectorActionWayMax,
}ProjectorActionWay;

static int clearConfigMemory(ITEM *items, int realItemNum);
static int putConfigureDataIntoMemory(ITEM *items, int maxItemNum, int realItemNum);
static int initLog(ITEM *items, int realItemNum);
static int realInitConfig(ITEM *items, int realItemNum);
static void setDefaultValue();
static int readConnectServerConfigInfo(char *value, ConnectionServerIpIndex index);
static int readMultConnectServerConfigInfo(char *value, MultConnectionServerIpIndex index, unsigned char sonIndex);
static int readProjectorCtrlCode(char *value, ProjectorActionWay actionWay);
static bool isIgnoreKey(const char *key);
static int combineConfigFile(const char *saveConfigFile,const char *realConfigFile);


int readConfigFile(const char *configFileDir);
int writeSoftwareVersionToCfg(const char *writeSoftwareVersionToCfg);

int initOther();

int fixConfigFile(const char *saveConfigFile,const char *realConfigFile, const char *saveConfig2File,const char *realConfig2File);

#endif
